﻿using System;
using System.Collections.Generic;
using System.Text;
using ATSModel;
using System.Data.SqlClient;
using System.Data;

namespace ATSDAL
{
    public class TMOIDConfig : BaseRepository_DT<MOIDConfig>
    {

        #region 静态变量定义部分 
        private const string PARM_TEST_MOID = "@MOID";
        #endregion

        // 通过MOID，获取MOID对应交调特采数据集合（标签打印软件对接）
        public MOIDConfig PIMSpecail_GetbyMOID(string MOID)
        {
            SqlParameter[] parms = GetParams(); 
            parms[0].Value = MOID;

            return ExcuteSqlToGetEntity("WEB_PIMSpecail_GetbyMOID", parms);
        }

        private static SqlParameter[] GetParams()
        {
            SqlParameter[] parms = null;
            parms = new SqlParameter[]
            { 
                new SqlParameter(PARM_TEST_MOID, SqlDbType.NVarChar, 50)
            };
            return parms;
        }

        public override MOIDConfig GetEntityRecord(SqlDataReader rdr)
        {
            MOIDConfig pro = new MOIDConfig
            {
               Settings= rdr.GetValue(0).ToString(),
            };
            return pro;
        }

        public override MOIDConfig GetEntityRecord()
        {
            MOIDConfig pro = new MOIDConfig();
            return pro;
        }
    }
}
